package cn.sunxyz.common.site.domain;

import org.springframework.data.jpa.domain.AbstractPersistable;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by sunxyz on 2017/3/2.
 */
@MappedSuperclass
public abstract class BaseEntity extends AbstractPersistable<Long> {

    private static final long serialVersionUID = 787509038864164839L;

    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;

    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;

    private String mark;

    public Date getCreateTime() {
        return createTime;
    }

    public BaseEntity setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public BaseEntity setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    public String getMark() {
        return mark;
    }

    public BaseEntity setMark(String mark) {
        this.mark = mark;
        return this;
    }
}